<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
<title>ϵͳ</title>
<%@ include file="/commons/meta.jsp"%>

</head>

<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="top"><div id="position">当前位置：系统管理 - 后台账号查询管理</div>
      <form name="form1" method="post" action="">
        <table width="95%" border="0" cellspacing="2" cellpadding="2">
          <tr>
            <td>
              <input name="queryCondition" type="text" value="${queryCondition }">
              <input type="button" name="Submit22" value="账号查询" onClick="javascript:query(1)">
              <input type="button" name="Submit32" onClick="javascript:add()" value="添加账号">            </td>
          </tr>
        </table>
        <table width="95%" cellpadding="2" cellspacing="1" bgcolor="#CEEFFF">
          <tr>
            <td width="40" class="listtitle">&nbsp;</td>
            <td width="40" class="listtitle">登录名</td>
            <td width="70" class="listtitle">姓名</td>
            <td width="30" class="listtitle">性别</td>
            <td width="100" class="listtitle">部门</td>
            <td width="180" class="listtitle">邮箱</td>
            <td width="70" class="listtitle">账号类型</td>
            <td class="listtitle">&nbsp;</td>
          </tr>
          <s:iterator value="entites" status="status">
          <tr>
            <td width="20" bgcolor="#FFFFFF"><input type="checkbox" name="id" value="${id}"></td>
            <td width="30" bgcolor="#FFFFFF">${loginName}</td>
            <td width="70" bgcolor="#FFFFFF">${name}</td>
            <td width="30" bgcolor="#FFFFFF">男</td>
            <td width="100" bgcolor="#FFFFFF">${department }</td>
            <td width="180" bgcolor="#FFFFFF">${email}</td>
            <td width="100" bgcolor="#FFFFFF">
            <c:forEach items="${roles}" var="role">
				<c:out value="${role.name}"/>
			</c:forEach> 
            </td>
            <td bgcolor="#FFFFFF">
            	<a href="${ctx}/admin/user!input.action?id=${id}">修改</a>
            	<a href="${ctx}/admin/user!delete.action?id=${id}">删除</a>
            </td>
          </tr> 
          </s:iterator>
        </table> 
        <table width="95%" border="0" cellspacing="2" cellpadding="2">
          <tr>
            <td width="30%" align="center">共${objectCount}条 共${pageCount}页</td>
            <td align="center"><c:if test="${pagePrev != 0}">[<a href="${ctx}/admin/user!list.action?pageIndex=${pagePrev}">上页</a>]</c:if><c:if test="${pageNext != 0}">  [<a href="${ctx}/admin/user!list.action?pageIndex=${pageNext}">下页</a>]</c:if></td>
            <td width="30%" align="center">直接转到第
              <select name="select"  name="pageIndex" onChange="javascript:query(this.value)">
              	<c:forEach begin="1" end="${pageCount}" var="currentPage">
					<option value="${currentPage}" <c:if test="${pageIndex ==currentPage }">selected</c:if>>
						<c:out value="${currentPage}"/>
					</option>
				</c:forEach>
              </select>
			页</td>
          </tr>
        </table>  
      </form>    </td>
  </tr>
</table>
</body>
</html>
<script language="javascript" type="text/javascript">
 	 //分页查询浏览
            function query(pageIndex)
            {
               	${'form1'}.action = "${ctx}/admin/user!list.action?pageIndex="+pageIndex;
               	${'form1'}.submit();
            }
             function add()
            { 
            	${'form1'}.action= "${ctx}/admin/user!input.action";
            	${'form1'}.submit(); 
            }
</script>
